package com.hehe.Base;

import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.io.File;

@Component
public class FileUploadConfig {

    @Value("${file.upload.path}")
    private String saveFolderPath;

    private static String SAVE_FOLDER_PATH;

    // 系统文件分隔符（统一使用） windows/linux
    public static final String SEP = File.separator;

    @PostConstruct
    public void init() {
        SAVE_FOLDER_PATH = saveFolderPath;
    }

    public static String getSaveFolderPath() {
        return SAVE_FOLDER_PATH;
    }
}


